package com.ymk.service.impl;

import com.ymk.base.mybatis.DaoRouter;
import com.ymk.base.mybatis.Pagination;
import com.ymk.bo.work.WorkToTypeBO;
import com.ymk.service.IWorkToTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 莫参商
 * @since 2023-06-12
 */
@Service
public class WorkToTypeServiceImpl implements IWorkToTypeService {

    @Override
    public WorkToTypeBO get(Map param) {
    return this.daoRouter.queryForObject("WorkToType.loadWorkToType",param);
    }

    @Override
    public List<WorkToTypeBO> list(Map param) {
        return this.daoRouter.query("WorkToType.loadWorkToType",param);
    }

    @Override
    public List<WorkToTypeBO> listForPage(Pagination pagination) {
        return this.daoRouter.query("WorkToType.loadWorkToTypeForPage",pagination);
    }

    @Override
    public void post(WorkToTypeBO param) {
        this.daoRouter.insert("AWorkToType.insertWorkToType",param);
    }

    @Override
    public void update(WorkToTypeBO param) {
        this.daoRouter.update("AWorkToType.updateWorkToType",param);
    }

    @Override
    public void del(WorkToTypeBO param) {
        this.daoRouter.update("AWorkToType.delWorkToType",param);
    }

    @Autowired
    private DaoRouter daoRouter;

}
